package com.auto.oa.sys.dao.impl;

import java.util.List;
import java.util.Map;

import com.system.common.Page;
import com.auto.oa.sys.domain.OaSysConstantCode;
import com.auto.oa.sys.dao.IOaSysConstantCodeDAO;
import com.system.util.PersistUtil;
import com.auto.oa.sys.sql.sqlid.OaSysConstantCodeSqlID;
/**
 * : t_auto_oa_sys_constant_code
 * 
 * 
 * @author Gen
 */
public class OaSysConstantCodeDAOImpl implements IOaSysConstantCodeDAO{

	public OaSysConstantCode insertOaSysConstantCode(OaSysConstantCode bean){
		return PersistUtil.insert(bean, OaSysConstantCodeSqlID.INSERT);
	}

	public boolean deleteOaSysConstantCode(String osccGuid){
		PersistUtil.delete(osccGuid, OaSysConstantCodeSqlID.DELETE);
		return true;
	}	

	public OaSysConstantCode updateOaSysConstantCode(OaSysConstantCode bean){
		return PersistUtil.update(bean, OaSysConstantCodeSqlID.UPDATE);
	}	

	public OaSysConstantCode loadOaSysConstantCode(String osccGuid){
		return PersistUtil.query(OaSysConstantCode.class, osccGuid);
	}

	public List<OaSysConstantCode> queryList(Map<String,Object> param,Page page){
		page.setCount(PersistUtil.countSpecial(param, OaSysConstantCodeSqlID.QUERY));
		return PersistUtil.querySpecial(param, OaSysConstantCodeSqlID.QUERY, page.getFullOrderBy(), page.getOffset(), page.getLimit());
	}

	public List<OaSysConstantCode> queryList(Map<String, Object> param) {
		return PersistUtil.queryList(OaSysConstantCode.class, param);
	}

	public List<OaSysConstantCode> queryChildren(Map<String, Object> param) {
		return PersistUtil.query(param, OaSysConstantCodeSqlID.QUERY_CHILDREN);
	}

}
